USE JICCDB
GO
CREATE PROC proc_LoginValidate
@LoginName NVARCHAR(10),
@password NVARCHAR(50)
AS
SELECT LoginName,Password,NickName,Name,Telphone,Sex,Birthday,Email,
Address,Memo,p.PositionName,pic.picture,d.DptName
FROM tab_User AS u INNER JOIN tab_Position AS p ON u.PosID = p.PositionID
INNER JOIN tab_Picture AS pic ON u.HeadPID = pic.PicID
INNER JOIN tab_Department AS d ON u.DptID = d.DptID
WHERE LoginName = @LoginName AND Password = @password
GO